import 'package:flutter/services.dart';

class NativeWindowApi {
  static const BasicMessageChannel<Object?> _channel =
      BasicMessageChannel<Object?>('custom_window_channel', StandardMessageCodec());

  static Future<int?> getMainWindowHandle() async {
    final reply = await _channel.send('getMainWindowHandle');
    if (reply is int) {
      print("111");
      return reply;
    }
    print("222");
    return null;
  }
}
